// miniprogram/pages/superUser/superUser.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    nickName: "",
    headSrc: "",
    openId: ""
  },

  // 点击发布比赛跳转到对应页面
  goToGameRelease: function () {
    let that = this
    wx.navigateTo({
      url: '/pages/superGameRelease/superGameRelease'
    })
  },

  // 点击查看比赛跳转到对应页面
  goToChangeGame: function () {
    let that = this
    wx.navigateTo({
      url: '/pages/superCheckGame/superCheckGame'
    })
  },

  // 点击发布新闻跳转到对应页面
  goToNewsRelease: function () {
    let that = this
    wx.navigateTo({
      url: '/pages/superNewsRelease/superNewsRelease'
    })
  },

  // 点击查看新闻新闻跳转到对应页面
  goToChangeNews: function () {
    let that = this
    wx.navigateTo({
      url: '/pages/superCheckNews/superCheckNews'
    })
  },

  // 点击跳转到普通用户跳转到对应页面
  goToUser: function () {
    let that = this
    wx.navigateTo({
      url: '/pages/index/index?headSrc=' + that.data.headSrc + "&nickName=" + that.data.nickName + "&openId=" + that.data.openId
    })
  },

  // 点击上传代码或成绩跳转到对应页面
  goToUpload: function () {
    let that = this
    wx.navigateTo({
      url: '/pages/superUpload/superUpload'
    })
  },

  // 点击修改管理权限跳转到对应页面
  goToModify: function () {
    let that = this
    wx.navigateTo({
      url: '/pages/superModify/superModify'
    })
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
    wx.showToast({
      title: '跳转到管理员页面',
      image: '/images/superUser.png'
    })
    this.setData({
      nickName: options.nickName,
      headSrc: options.headSrc,
      openId: options.openId
    })
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {

  }
})